package com.example.servicebase.client;

import com.example.commonutils.ordervo.MemberForOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

@Component
@FeignClient(value = "service-ucenter",fallbackFactory = UcenterClientFallbackFactory.class)
public interface UcenterClient {
    @GetMapping("/ucenter/member/getUserForOrder/{userId}")
    public MemberForOrder getUserForOrder(@PathVariable("userId") String userId);

    @GetMapping("/ucenter/member/getUserInfo/{memberId}")
    Map<String,String> getUserInfo(@PathVariable("memberId") String memberId);

    @GetMapping("/ucenter/member/countRegister/{date}")
    Integer countRegister(@PathVariable("date") String date);

    @GetMapping("/ucenter/member/getLoginCount")
    Integer LoginCount();
}
